.TH std::char_traits::compare,std::char_traits::compare, 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::char_traits::compare,std::char_traits::compare, \- std::char_traits::compare,std::char_traits::compare,

.SH Synopsis
                           std::char_traits<char32_t>::compare

   static int compare( const char_type* s1, const char_type*
   s2,                                                          (constexpr since C++17)
                       std::size_t count );

   Compares the first count characters of the character strings s1 and s2. The
   comparison is done lexicographically.

   If count is zero, strings are considered equal.

   See CharTraits for the general requirements on character traits for X::compare.

.SH Parameters

   s1, s2 - pointers to character strings to compare
   count  - the number of characters to compare from each character string

.SH Return value

   Negative value if s1 is less than s2.

   0 if s1 is equal to s2.

   Positive value if s1 is greater than s2.

.SH Complexity

   Linear in count.
